# -*- coding: utf-8 -*-
# @Time     : 2021/4/9 18:40
# @Author   : pengrenjie
# @Email    : 941257162@.com
# @File     : 文件操作练习2.py.py
with open('guest.txt','a+',encoding='utf-8') as fp:
    while 1:
        guestname = input('请输入你的名字:')
        if guestname == 'exit':
            break
        else:
            fp.write(f"{guestname}\n")

















